/* Author: Florian Seidler, Jonathan Zopes
 * Date: 25.11.2012
 * Issue: Misc Functions for Polymer Simulation
*/

#ifndef MISC_H
#define MISC_H
signed int randomsign(int n);
int generate_random_direction(int lastdirection, int dimension);
double calc_walk_distance(int **walk,int walksize,int dimension);
void copy_walk(int **fromwalk, int **towalk, int walksize, int dimension);
void set_walk(int **setwalk, int walksize, int dimension, int c);
void set_array(int *array, int length, int c);
void print_walk_to_file(int **walk, int walksize, int dimension, char *path);
int check_for_intersection(int **walk,int *buffer, int walksize, int dimension, int step);
int simple_sampling_saw(int **walk,int *buffer, int walksize, int dimension);
double biased_sampling_saw(int **walk, int *buffer, int *freedirection ,int walksize, int dimension);
double simple_sampling_average_distance(int **walk, int *buffer, int walksize, int dimension, int numberofwalks);
#endif
